package com.yoyoyo666.report.mapper;

import com.yoyoyo666.report.model.ReportUser;
import org.apache.ibatis.annotations.Param;
import org.springframework.cache.annotation.Cacheable;

import java.util.List;

public interface ReportUserMapper {
    int deleteByPrimaryKey(String id);

    int insert(ReportUser record);

    int insertSelective(ReportUser record);


    ReportUser selectByPrimaryKey(String id);


    ReportUser selectByUserName(String username);

    @Cacheable(value = "TEMP_CACHE",key = "methodName + #p0")
    ReportUser selectByMail(String mailName);

    ReportUser login(@Param("username") String username, @Param("password") String password);

    int updateByPrimaryKeySelective(ReportUser record);

    int updateByPrimaryKey(ReportUser record);

    List<ReportUser> getDayIncrement(@Param("start") String start, @Param("end") String end);
}